luci-mod-network: don't implicitly move bridge opts into device sections
authorJo-Philipp Wich <[email protected]>
Mon, 29 Mar 2021 14:00:10 +0000 (16:00 +0200)
committerRafał Miłecki <[email protected]>
Thu, 27 May 2021 10:19:05 +0000 (12:19 +0200)
commit216ddcce7109e74743a8fb58fec6a932edd0c35e
tree3acc36452fa1a5e944775f4d8c2f7e6d2cf218c3
parentdec5d8099edb09d44713544e4a823cdd19f1b616
luci-mod-network: don't implicitly move bridge opts into device sections

When setting bridge and device specific options such 'stp' or
'igmp_snooping', LuCI so far transparently created or reused a
`config device` section and set the corresponding option there.

In the case of bridges, this triggers multiple problems:

 - When implicitely creating a `config device` section referring to the
   bridge device, the legacy bridge configuration of the corresponding
   interface is disabled, causing a broken configuration on subsequent
   save operations

 - Netifd does not appear to properly merge bridge settings from config
   device and config interface sections, leading to an incoherent
   configuration state

In order to avoid that issue, do not automatically migrate bridge specific
options.

Fixes: #4948
Signed-off-by: Jo-Philipp Wich <[email protected]>
(cherry picked from commit a9a223b973c7f5f057d19a7fc09e7364087fec79)
modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js